{% load static %}
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Jobstart &mdash; Colorlib Website Template</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito+Sans:200,300,400,700,900|Roboto+Mono:300,400,500"> 
    <link rel="stylesheet" href="/static/html/fonts/icomoon/style.css">

    <link rel="stylesheet" href="/static/html/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/html/css/magnific-popup.css">
    <link rel="stylesheet" href="/static/html/css/jquery-ui.css">
    <link rel="stylesheet" href="/static/html/css/owl.carousel.min.css">
    <link rel="stylesheet" href="/static/html/css/owl.theme.default.min.css">
    <link rel="stylesheet" href="/static/html/css/bootstrap-datepicker.css">
    <link rel="stylesheet" href="/static/html/css/animate.css">
    
    
    <link rel="stylesheet" href="/static/html/fonts/flaticon/font/flaticon.css">
    <link rel="stylesheet" href="/static/html/css/fl-bigmug-line.css">
  
    <link rel="stylesheet" href="/static/html/css/aos.css">

    <link rel="stylesheet" href="/static/html/css/style.css">
    
  </head>
  <body>
  
  <div class="site-wrap">

    <div class="site-mobile-menu">
      <div class="site-mobile-menu-header">
        <div class="site-mobile-menu-close mt-3">
          <span class="icon-close2 js-menu-toggle"></span>
        </div>
      </div>
      <div class="site-mobile-menu-body"></div>
    </div> <!-- .site-mobile-menu -->
    

    <header class="site-navbar py-1" role="banner">

      <div class="container">
        <div class="row align-items-center">

          <div class="col-6 col-xl-2">
            <h1 class="mb-0"><a href="{% url 'main' %}" class="text-black h2 mb-0">云招网</a></h1>
          </div>

          <div class="col-10 col-xl-10 d-none d-xl-block">
            <nav class="site-navigation text-right" role="navigation">

              <ul class="site-menu js-clone-nav mr-auto d-none d-lg-block">
                <li><a href="{% url 'main' %}">首页</a></li>
                <li><a href="{% url 'company_index' %}">招聘广场</a></li>

                 {% if request.session.is_login %}
                <li class="dropdown">
                    <a href="#" class="rounded bg-primary py-2 px-3 text-white" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ cname }} <span class="caret"></span></a>
                    <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
                        <li><a href="{% url 'company_message' %}">接受到的简历</a></li>

                        <li><a href="{% url 'showcompany_job' %}">我发布的招聘信息</a></li>

                    </ul>
                </li>
                <li><a class="rounded bg-danger py-2 px-3 text-white" href="{% url 'logout' %}" >退出登录</a></li>
                  {% else %}
                  <li><a href="{% url 'login' %}">登录/注册</a></li>
                  {% endif %}

              </ul>
            </nav>
          </div>
        </div>
      </div>

    </header>






    <div class="unit-5 overlay" style="background-image: url('/static/html/images/hero_bg_2.jpg');">
      <div class="container text-center">
        <h2 class="mb-0">招贤纳士</h2>
      </div>
    </div>



    <div class="site-section bg-light">
      <div class="container">



  {% for i in contacts %}
        <div class="row" data-aos="fade">
         <div class="col-md-12">
           <div class="job-post-item bg-white p-4 d-block d-md-flex align-items-center">

              <div class="mb-4 mb-md-0 mr-5">
                  <h6 class="text-warning">应聘岗位:<span>{{ i.job }}</span></h6>
               <div class="job-post-item-header d-flex align-items-center">
                 <h2 class="mr-3 text-black h4">{{ i.Professional }}</h2>
                  <h2 class="bg-primary text-white badge py-2 px-4">{{ i.name }}</h2>
                 <div class="badge-wrap">
                  <span class="bg-warning text-white badge py-2 px-4">{{ i.age }}<span>岁</span></span>&nbsp;
                 </div>
               </div>
               <div class="job-post-item-body d-block d-md-flex">
                 <div class="mr-3"><span class="fl-bigmug-line-planetary2"></span> <a href="https://www.baidu.com/s?wd={{ i.col_name }}">{{ i.col_name }}</a></div>
                 <div><span class="fl-bigmug-line-big104"></span> <span>{{ i.address }}</span></div>
               </div>

                <br>
              </div>
{##}
{#                {% if exist2 %}#}
{#                <div class="ml-auto">#}
{#                  <a href="#" class="btn btn-danger py-2" >等待用户确认</a>#}
{#                </div>#}
{#                    {% endif %}#}

            {% if i.exist4 %}
                <div class="ml-auto">
                  <h4 class="btn btn-info py-2" >约定成功！请按时准备面试</h4>
                </div>
                {% else %}
                      <h4  class="btn btn-danger py-2" >等待用户确认面试</h4>
            {% endif %}

               <div class="ml-auto">
                  {% if i.exist %}
                <div ><span class="text-black">面试时间</span>&nbsp<span class="text-black">{{ i.order_time }}</span></div><br>
                <div ><span class="text-black ">面试地点</span>&nbsp<span class="text-black ">{{ i.order_place }}</span></div><br>
                      {% else %}
                      <form action="{% url 'addinterviewmsg' %}" method="post">
                      {% csrf_token %}
                <div><span class="text-black">面试时间</span>&nbsp<span><input type="date" name="order_time"></span></div></br>
                <div><span class="text-black ">面试地点</span>&nbsp<span><input type="text" name="order_place"></span></div></br>
{#                          <input hidden="hidden"  value="{{i.id}}" name="id">#}
                          <button class="rounded btn-warning py-2 " id="accept" name="id" value="{{i.id}}">提交</button>
                          <script>
                         $('#accept').click(function(){
                            $.getJSON('{% url 'addinterviewmsg' %}',{'id':{{i.id}}},function(data){
                                if(data.msg == "success"){
                                    alert('投递成功')
                                }
                            })
                        });
                        </script>
                      </form>
                  {% endif %}
              </div>
           </div>

         </div>
        </div>

{% endfor %}



              <div class="row mt-5">
                  <div class="col-md-12 text-center">
                    <div class="site-block-27" >
                        <div class="d-flex justify-content-center">
                            <!-- 分页导航条 -->
                            <div class="pagination">
                                <span class="step-links">
                                    {% if contacts.has_previous %}
                                        <a href="?page=1">&laquo; 第一页</a>
                                        <a href="?page={{ contacts.previous_page_number }}">上一页</a>
                                    {% endif %}

                                    <span class="current">
                                        页码: {{ contacts.number }} / {{ contacts.paginator.num_pages }}
                                    </span>

                                    {% if contacts.has_next %}
                                        <a href="?page={{ contacts.next_page_number }}">下一页</a>
                                        <a href="?page={{ contacts.paginator.num_pages }}">最后一页 &raquo;</a>
                                    {% endif %}
                                </span>
                            </div>
                        </div>
                    </div>
                  </div>
                </div>


      </div>
    </div>    


    

    

    

    

    <footer class="site-footer">
      <div class="container">
        

        <div class="row">
          <div class="col-lg-9">
            <div class="row">
              <div class="col-6 col-md-3 col-lg-3 mb-5 mb-lg-0">
                <h3 class="footer-heading mb-4">For Candidates</h3>
                <ul class="list-unstyled">
                  <li><a href="#">Register</a></li>
                  <li><a href="#">Find Jobs</a></li>
                  <li><a href="#">News</a></li>
                  <li><a href="#">Search Jobs</a></li>
                  <li><a href="#">Contact</a></li>
                  <li><a href="#">Careers</a></li>
                </ul>
              </div>
              <div class="col-6 col-md-3 col-lg-3 mb-5 mb-lg-0">
                <h3 class="footer-heading mb-4">For Employers</h3>
                <ul class="list-unstyled">
                  <li><a href="#">Employer Account</a></li>
                  <li><a href="#">Clients</a></li>
                  <li><a href="#">News</a></li>
                  <li><a href="#">Find Candidates</a></li>
                  <li><a href="#">Terms &amp; Policies</a></li>
                  <li><a href="#">Careers</a></li>
                </ul>
              </div>
              <div class="col-6 col-md-3 col-lg-3 mb-5 mb-lg-0">
                <h3 class="footer-heading mb-4">Archives</h3>
                <ul class="list-unstyled">
                  <li><a href="#">January 2018</a></li>
                  <li><a href="#">February 2018</a></li>
                  <li><a href="#">March 2018</a></li>
                  <li><a href="#">April 2018</a></li>
                  <li><a href="#">May 2018</a></li>
                  <li><a href="#">June 2918</a></li>
                </ul>
              </div>
              <div class="col-6 col-md-3 col-lg-3 mb-5 mb-lg-0">
                <h3 class="footer-heading mb-4">Company</h3>
                <ul class="list-unstyled">
                  <li><a href="#">About</a></li>
                  <li><a href="#">Team</a></li>
                  <li><a href="#">Terms &amp; Policies</a></li>
                  <li><a href="#">Contact Us</a></li>
                </ul>
              </div>
            </div>
          </div>
          <div class="col-lg-3">
            <h3 class="footer-heading mb-4">Contact Info</h3>
            <ul class="list-unstyled">
              <li>
                <span class="d-block text-white">Address</span>
                New York - 2398 10 Hadson Carl Street
              </li>
              <li>
                <span class="d-block text-white">Telephone</span>
                +1 232 305 3930
              </li>
              <li>
                <span class="d-block text-white">Email</span>
                info@yourdomain.com
              </li>
            </ul>
            
          </div>
        </div>
      </div>
    </footer>
  </div>

  <script src="/static/html/js/jquery-3.3.1.min.js"></script>
  <script src="/static/html/js/jquery-migrate-3.0.1.min.js"></script>
  <script src="/static/html/js/jquery-ui.js"></script>
  <script src="/static/html/js/popper.min.js"></script>
  <script src="/static/html/js/bootstrap.min.js"></script>
  <script src="/static/html/js/owl.carousel.min.js"></script>
  <script src="/static/html/js/jquery.stellar.min.js"></script>
  <script src="/static/html/js/jquery.countdown.min.js"></script>
  <script src="/static/html/js/jquery.magnific-popup.min.js"></script>
  <script src="/static/html/js/bootstrap-datepicker.min.js"></script>
  <script src="/static/html/js/aos.js"></script>
  <script src="/static/html/js/main.js"></script>


  </body>
</html>